<%@ page language="java" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8"%>
    <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
		<title>论坛首页</title>
		<link ref="stylesheet" href="css/bootstrap.min.css">
	</head>
	<body style="margin-top: 50px;margin-left: 500px;">
		<div class="container">
			<c:if test="${user==null} ">
				<a href="login.jsp" class="btn btn-success">登录</a>
			</c:if>
			<a href="register.jsp" class="btn btn-default">注册</a>
			<a href="login.jsp" class="btn btn-default">退出</a>
			${user.user_name}
			<img src="${user.user_img } class="img-rounded" width="30"/>
			<ul class="nav nav - tabs">
				<li class="active"><a href="">首页</a></li>
				<li><a href="">前沿技术</a></li>
				<li><a href="">UI设计</a></li>
				<li><a href="">数据库</a></li>
				<li><a href="">关于</a></li>
			</ul><br/>
			<a href="allTheme.spring" class="btn btn-primary">发帖子</a><br/>
			<ul>
				<li><a href="tiepages.spring?pageIndex=1">首页</a></li>
				<li><a href="tiepages.spring?pageIndex=${pagesIndex -1}">&laquo;</a></li>
				<c:forEach begin="1" end="${pagecount }" step="1" var="i">
					<li ${pageIndex == i ?'class=active' : ''}><a href="tiepages.spring?pageIndex=${i}">${i }</a></li>
				</c:forEach>
				<li><a href="tiepages.spring?pageIndex=${pagesIndex+1}">&raquo;</a></li>
				<li><a href="tiepages.spring?pageIndex=${pagecount }">尾页</a></li>
			</ul>
			<table class="table table-hover" >
				<tr>
					<td width="50%">帖子标题</td>
					<td width="15%" style="text-align: center;">作者</td>
					<td width="15%" style="text-align: center;">回复/查看</td>
					<td width="20%">最后发表</td>
				</tr>
				<c:forEach var="tie" items="${alltie}">
					<tr>
						<td>
							<h4><a href="readTie.spring?t_id=${tie.t_id }">${tie.t_title}</a></h4>
						</td>
						<td style="text-align: center;">
							${tie.user.user_name }<br>
							<span style="color:#999;">${tie.t_time}</span>
						</td>
						<td style="text-align: center;">
							1/290
						</td>
						<td>
							admin<br>
							<span atyle="">${tie.t_time }</span>
						</td>
					</tr>
				</c:forEach>
			</table>
			
		</div>
		<script scr="js/jquery.min.js"></script>
		<script scr="js/bootstrap.min.js"></script>
	</body>
</html>